<?php

namespace App\Library\Logic;

use App\Models\ShopCategoryModel;

class ShopCategoryLogic extends ShopCategoryModel
{
    public static function getByParentId(int $id): array
    {
        return self::query()->where('category_parent_id',$id)->pluck('category_name', 'category_id')->toArray();
    }
}
